<template>
  <div>Read</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from "vuex";
export default {
	name: "Read",
	data() {
		return {
			firstId:1001,
			secondId:20001
		}
	},
  computed: {
    ...mapState({
    	readBannerDatas: state => state.read.readBannerDatas,
    	firstReadListDatas: state => state.read.firstReadListDatas,
    	secondReadListDatas: state => state.read.secondReadListDatas,
    	thirdReadListDatas: state => state.read.thirdReadListDatas
    })
  },
  mounted() {
		const {firstId, secondId} = this
		this.updateReadBannerDatas()
		this.updateReadListDatas({})//一级频道不用传递参数
		this.updateReadListDatas({firstId})//二级频道需要传递参数firstId
		this.updateReadListDatas({firstId, secondId})//三级频道不用传递参数
  },
  methods: {
    ...mapActions({
			updateReadBannerDatas: 'updateReadBannerDatas',
			updateReadListDatas: 'updateReadListDatas'
    })
    
  },
};
</script>
<style lang="less" rel="stylesheet/less" scoped>
</style>